<template>
  <view>
    <view class="list" v-for="(item,index) in list" :key="index">
      <view class="top">
        <view class="num">任务编号:  {{item.transportTaskId}}</view>
        <view class="icon" v-if="item.integer">已延迟</view>
        </view>
        <view class="content">
          <view class="location">
            <view class="start">
              {{item.startAddress}}
            </view>
            <view class="end">
              {{item.endAddress}}
            </view>
          </view>
        </view>
        <view class="bottom">
          <view class="left">
            <text>{{item.status===1||item.status===4?'提货时间':'交货时间'}}</text>
            <view class="time">{{item.planDepartureTime}}</view>
            </view>
          <view class="btn">
            <u-button text="提货" shape="circle" size="small"
            color="#ee4f3e" :disabled="!item.enablePickUp" v-if="item.status === 1"></u-button>
          </view>
        </view>

    </view>
      
  </view>
</template>

<script>
  export default {
    name: 'IndexList',
    components: {},
    props:{
      list:Array
    },
    data() {
      return {
        
      };
    },
    created(){},
    mounted(){},
    onLoad(){},
    methods: {
      
    }
  }
</script>

<style lang="scss">
.list{
  background-color: #ffffff;
  width: 345px;
  height: 229px;
  margin: 0 auto;
  margin-top: 15px;
  padding: 0 10px 0 15px;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  .top{
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 22px;
    margin: 15px 0 21px 0;
    .icon{
      width: 52px;
      height: 22px;
      border: 1px solid #EF4F3F;
      border-radius: 11px;
      font-family: PingFangSC-Regular;
      font-weight: 400;
      font-size: 12px;
      color: #EF4F3F;
      text-align: center;
      line-height: 22px;
    }
    .num{
      font-family: PingFangSC-Medium;
      font-weight: 700;
      font-size: 16px;
      color: #2A2929;
    }
  }
  .content{
    box-sizing: content-box;
    flex: 1;
    font-family: PingFangSC-Regular;
    font-weight: 400;
    font-size: 14px;
    color: #818181;
    border-bottom: 1px solid #EEEEEE;
    padding-bottom: 22px;
    .location{
      box-sizing: content-box;
      display: flex;
      border-left: 1px dashed #818181 ;
      padding-left: 25px;
      width: 100%;
      height: 100%;
      flex-direction: column;
      justify-content: space-between;
      .start{
        position: relative;
        &::after{
          top: 0;
          left:-34px;
          content: '起';
          position: absolute;
          width: 22px;
          height: 22px;
          background: #2A2929;
          border-radius: 11px;
          font-family: PingFangSC-Medium;
          font-weight: 500;
          font-size: 12px;
          color: #FFFFFF;
          text-align: center;
          line-height: 22px;
        }
      }
      .end{
        position: relative;
        &::after{
          top: 0;
          left:-34px;
          position: absolute;
          content: '止';
          width: 22px;
          height: 22px;
          background: #EF4F3F;
          border-radius: 11px;
          font-family: PingFangSC-Medium;
          font-weight: 500;
          font-size: 12px;
          color: #FFFFFF;
          text-align: center;
          line-height: 22px;
        }
      }
    }
  }
  .bottom{
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 40px;
    margin: 14px 0 18px 0;
     color: #818181ff;
     font-size: 14px;
     font-face: PingFangSC;
     font-weight: 400;
     .left{
       .time{
         color: #2A2929;
         margin-top: 5px;
       }
     }
  }
}
</style>